int balancedStringSplit(char* s) {
	int cnt = 0;

	int rc = 0;
	int lc = 0;
	while (*s) {
		if (*s == 'R')
			rc++;
		else if (*s == 'L')
			lc++;
		if (rc == lc)
			cnt++;
		s++;
	}
	return cnt;
}